

package service;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import jdbc.MyJdbc;


public class PerReInfoService {
    
    
    
    public ArrayList ShowReInfo(String id) {
        ArrayList<String> PerReInfor = new ArrayList();
        try {
            String sql = "select time from registration where studentID = ?";
            MyJdbc jdbc = new MyJdbc();
            jdbc.getConnection();            
            ResultSet res = jdbc.query(sql, id);
            while(res.next()) {
                PerReInfor.add(res.getString(1));
            }
            jdbc.close();
        } catch (Exception ex) {
            Logger.getLogger(PerReInfoService.class.getName()).log(Level.SEVERE, null, ex);
        }
        return PerReInfor;
    }
}
